home *** CD-ROM | disk | FTP | other *** search
/ Tiger Disk 53 / Tiger_Disk_053_1998-08_Tiger-Crew-Disk_de_Side_B.d64 / 1581 copy sb (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  4KB  |  111 lines

  1. 0 close15:open15,8,15,"u9":close15
  2. 14 print"[147]"
  3. 15 poke 53281,0:poke53280,0:poke56,40:clr:tx$="a":fora=1to40:tx$=tx$+"a":next
  4. 20 print"[154]                                        "
  5. 22 print"[145]              copier 1581                 "
  6. 24 print"[145][154]                                        "
  7. 25 print"[155]a multi file copier to copy files from  the 1541 to 1581";
  8. 26 print"[150] ******** [156]s.a.brethour"
  9. 29 gosub1000:gosub2100
  10. 30 op=51:dim f$(op),t$(op),p(op),b%(op):gosub1200:gosub1100:bf=168:a1=1
  11. 65 poke3,0:poke4,peek(56):ifv=0then990
  12. 70 print"[147]":gosub5000:print"[150]reading[153]":fora=1tov:iff$(a)=""then100
  13. 75 f$(a)=f$(a)+","+t$(a)+",":bf=bf-b%(a):ifbf<1thengosub1300
  14. 79 printleft$(f$(a),len(f$(a))-3)
  15. 80 open15,d,15:open2,d,2,f$(a)+"r"
  16. 82 input#15,er,er$:iferthenprinttab(20)"[145]"er$:goto87
  17. 84 sys866
  18. 87 close2:close15:p(a)=peek(3)+peek(4)*256:p1=p(a)+1
  19. 90 h=int(p1/256):l=p1-(h*256):poke3,l:poke4,h:ifbf-b%(a+1)<1thengosub1300
  20. 100 next a:ifpeek(4)=peek(56)andpeek(3)=0then990
  21. 110 f=-99:gosub1300
  22. 990 print"any more files? (y/n) ";
  23. 991 geta$:ifa$<>"y"anda$<>"n"then991
  24. 992 ifa$="y"then14
  25. 999 clr:end
  26. 1000 fori=828to898:readx:pokei,x:nexti:return
  27. 1020 data162,2,32,201,255,198,1,160,0,56,165,3
  28. 1030 data229,5,165,4,229,6,176,13,177,3,32,210
  29. 1040 data255,230,3,208,236,230,4,208,232,230,1,76
  30. 1050 data204,255,162,2,32,198,255,160,0,32,207,255
  31. 1060 data145,3,230,3,208,2,230,4,36,144,80,241
  32. 1070 data165,3,133,5,165,4,133,6,76,204,255
  33. 1100 u=1:print:print:ay=0:q$="y"
  34. 1108 print"[159][147]":gosub5000
  35. 1110 open8,d,0,"$0:"+pm$
  36. 1120 get#8,a$,a$,a$,a$,a$,a$:sys899:printleft$(tx$,peek(142))
  37. 1125 get#8,a$,a$,a$,b$
  38. 1130 c=asc(a$+chr$(0))+asc(b$+chr$(0))*256
  39. 1135 if peek(144)<>0 then1190
  40. 1140 print c;
  41. 1145 sys899:ss=peek(144):printleft$(tx$,peek(142)):ifleft$(tx$,3)="blo"then1190
  42. 1150 print"[145]";tab(30);"[153](y/n) ";
  43. 1155 a$=left$(tx$,peek(142))
  44. 1160 ifay<>-99thengett$:ift$<>" "andt$<>"y"andt$<>"n"andt$<>chr$(13)then1160
  45. 1165 ift$=chr$(13)thenprintq$:goto1170
  46. 1166 print"[150]";:printt$;:print"[158]"
  47. 1170 ift$=chr$(32)then1195
  48. 1171 ift$=chr$(13)thenay=-99:t$=q$
  49. 1175 ift$="n"thenq$=t$:goto1185
  50. 1180 ift$="y"thenq$=t$:gosub2200:u=u+1
  51. 1183 ifu>op-1thenclose8:print"only";op-1;"files allowed at once":close8:goto1195
  52. 1185 goto1125
  53. 1190 print"[145]blocks free":close8
  54. 1195 v=u-1:forx=1to1500:next:return
  55. 1200 input "[158]copy from drive  8[157][157][157]";d
  56. 1210 ifd<8ord>11then1200
  57. 1220 input "[159]copy to drive  8[157][157][157]";d1
  58. 1230 ifd1<8ord1>11then1220
  59. 1250 input "[154]pattern match:  *[157][157][157]";pm$
  60. 1260 ifpm$=""orlen(pm$)>16then1250
  61. 1270 print"[155]format target (y/n)? ";
  62. 1275 geta$:ifa$="n"ora$=chr$(13)thenprint"n":return
  63. 1280 ifa$<>"y"then1275
  64. 1281 print"[147]":gosub 5000
  65. 1282 input"[156]name (16 chars max)";a$:ifa$=""thenreturn
  66. 1285 b$="":input"id (2 chars)";b$:ifb$<>""thena$=a$+","+b$
  67. 1287 ifd=d1thenprint"[129]insert blank disk":poke198,0:wait198,1:poke198,0
  68. 1288 print"[158]formatting...."
  69. 1290 open15,d1,15,"n0:"+a$:input#15,er,er$:iferthenprint""er$:end:run
  70. 1291 print"format another? (y/n) ";
  71. 1292 geta$:ifa$<>"y"anda$<>"n"anda$<>chr$(13)then1292
  72. 1293 ifa$=chr$(13)thena$="n"
  73. 1294 printa$:ifa$="y"thenclose15:a$="":goto1282
  74. 1295 close15:ifd=d1thenprint"[150]insert source":poke198,0:wait198,1:poke198,0
  75. 1296 return
  76. 1300 ifd=d1thenprint"[158]please swap":poke198,0:wait198,1:poke198,0
  77. 1301 poke3,0:poke4,peek(56):print"[154]writing":forb=a1toa:iff$(b)=""then1340
  78. 1302 printleft$(f$(b),len(f$(b))-3)
  79. 1305 p=p(b):h=int(p/256):l=p-(h*256):poke5,l:poke6,h
  80. 1320 open15,d1,15:open2,d1,2,f$(b)+"w"
  81. 1322 input#15,er,er$:iferthenprinttab(20)"[145]"er$:goto1327
  82. 1324 sys828
  83. 1327 close2:close15
  84. 1330 p=p(b)+1:h=int(p/256):l=p-(h*256):poke3,l:poke4,h
  85. 1340 nextb:a$="":print"write files to another disk?[146] (y/n)? ";:gosub2300
  86. 1341 ifa$="y"then1300
  87. 1342 poke3,0:poke4,peek(56)
  88. 1343 iff=-99then990
  89. 1345 ifd=d1thenprint"[150]please swap":poke198,0:wait198,1:poke198,0
  90. 1347 print"[129]reading"
  91. 1350 bf=168:a1=a+1:return
  92. 1999 rem string thing
  93. 2000 data 160,2,177,45,153,137,0,200,192,6
  94. 2010 data 208,246,162,8,32,198,255
  95. 2020 data 32,228,255,201,13,240,15,164,142,145
  96. 2030 data 140,200,132,142,196,139,240,4,165,144,240,234,76,204,255
  97. 2040 data 144,240,238,76,204,255
  98. 2100 fori=899to940:readx:pokei,x:next:poke920,0:return
  99. 2200 b%(u)=c:a$=left$(tx$,peek(142))
  100. 2210 f$(u)=mid$(str$(c)+a$,7,16)
  101. 2220 fora=1to16:ifmid$(f$(u),a,1)=chr$(34)thenf$(u)=left$(f$(u),a-1):a=17
  102. 2230 next:t$(u)=mid$(str$(c)+a$,25,1):return
  103. 2300 geta$:ifa$<>"y"anda$<>"n"anda$<>chr$(13)then2300
  104. 2310 ifa$=chr$(13)thena$="n"
  105. 2320 printa$:return
  106. 5000 print"[154]                                        "
  107. 5002 print"[145]               copier 1581               "
  108. 5004 print"[145][154]                                        "
  109. 5005 print"[158]"
  110. 5006 return
  111.